var express = require('express');
var router = express.Router();
const loginModel = require('../model/login');  //登录model


// 登录
router.post('/useLogin',function(req,res,next){
    // console.log(req.session)
    loginModel.login(req, res, next)
  })
// 登出
router.get('/useLoginOut',function(req,res,next){
  console.info(req.session.isLogin)
    loginModel.loginOut(req,res,next)
})  

// 注册
router.post('/useRegister',function(req,res,next){
  console.log(req.body)
  loginModel.register(req,res,next)
})
  


  module.exports = router